<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>预览建筑企业资质证书副本</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<style type="text/css">
			.inputNoborder {
			    FONT-SIZE: 16px;
			    FONT-FAMILY: 宋体;
			    BORDER-RIGHT: #FFFFFF 1px solid;
			    BORDER-TOP: #FFFFFF 1px solid;
			    BORDER-LEFT: #FFFFFF 1px solid;
			    BORDER-BOTTOM: #FFFFFF 1px solid;
			}
			.tableCss{
				background-color:#000000;
				width: 100%;
			}
			.tdCss{
				background-color:#ffffff;
				height: 30px;
			}
			.justifyCss{
				width:80%;
				text-align:justify;
				text-justify:distribute-all-lines;
				text-align-last:justify;
			}
			.wd{
				width:98%;
			}
		</style>
		<script src="${ctx}/resources/components/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
		<script src="${ctx}/resources/js/ext/adapter/ext/ext-base.js" type="text/javascript"></script>
        <script src="${ctx}/resources/js/ext/ext-all.js" type="text/javascript"></script>
		<script type="text/javascript">
		function printQyzzfb(){
			var templateCode = document.getElementById("templateCode").value;
			if(templateCode == 'rqrsqjazwxqyzzqx'){
		 		var url="yw-rq-qyzz-info-qx!printnewZzzsfb.action?id="+${id}+"&fbnum="+document.getElementById("fbzsbh").value;
            	window.open(url);
		 	}else{
		 		var url="yw-rq-qyzz-info!printnewZzzsfb.action?id="+${id}+"&fbnum="+document.getElementById("fbzsbh").value;
            	window.open(url);
		 	}
            
            // YwUtil.openWin({url: url, w: 1000, h: 800});
           }
		Ext.onReady(function(){
		  	var hjmc=document.getElementById("hjmc").value;
		    if (hjmc=="jbrsj"){//经办人办结改变
              document.getElementById("printzs").style.display='none';
              document.getElementById("savezs").style.display='block';
            }
            if(hjmc=="dzgz"){//打印设置为不可编辑
              document.getElementById("printzs").style.display='block';
              document.getElementById("savezs").style.display='none';
	          for (var i = 0; i < document.forms[0].elements.length; i++) {
	          	
			        var element = document.forms[0].elements[i];
			        if(element.name!="fbzsbh"){
			       	 	element.readOnly= true;
			       	 } 
			   }
            } 
		 });
		 
		 function  saveQyzzfb(){
		 	var templateCode = document.getElementById("templateCode").value;
		 	var form=document.forms[0];
		 	if(templateCode == 'rqrsqjazwxqyzzqx'){
		 		form.action="yw-rq-qyzz-info-qx!printSavefb.action";
		 	}else{
		 		form.action="yw-rq-qyzz-info!printSavefb.action";
		 	}
            form.submit();
            alert('保存成功!');
		 }
		</script>
	</head>
	<body>
		<form action="" method="POST" target="autoPrintIFrame">
		<input type="hidden" id="templateCode" name="templateCode" value="${templateCode}"/>
		<input type="hidden" name="id" value="${id}"/>
		<input type="hidden" name="qyxx.id" value="${qyxx.id}"/>
		<input type="hidden" name="hjmc" id="hjmc" value="${hjmc}">
		<table width="1100" align="center">
			<tr>
				<td width="50%">
					<table width="100%" border=0 class="tableCss" cellspacing="1" cellpadding="0">
						<tr>
							<td style="text-align:center;" class="tdCss" width="150px;"><div class="justifyCss">企业名称</div></td>
							<td style="padding-left:5px;" class="tdCss" colspan="5"><input name="sqdw" value="${sqdw}" class="inputNoborder wd"/></td>
						</tr>
						<tr>
							<td style="text-align:center;" class="tdCss"><div class="justifyCss">详细地址</div></td>
							<td style="padding-left:5px;" class="tdCss" colspan="5"><input name="qyxx.address" value="${qyxx.address}" class="inputNoborder wd"/></td>
						</tr>
						<tr>
							<td style="text-align:center;" class="tdCss"><div class="justifyCss">建立时间</div></td>
							<td style="padding-left:5px;" class="tdCss" colspan="5">
							<input name="qyxx.clsj" style="width:130" class="inputNoborder wd" value="<s:date name='qyxx.clsj' format="yyyy年MM月dd日"/>" onclick="WdatePicker({skin:'ext', dateFmt:'yyyy年MM月dd日'});" type="text" class="textdocWdate" readonly />
							</td>
						</tr>
						<tr>
							<td style="text-align:center;" class="tdCss"><div class="justifyCss">注册资本金</div></td>
							<td style="padding-left:5px;" class="tdCss" colspan="5"><input name="zczj" value="${zczj}" class="inputNoborder wd"/></td>
						</tr>
						<tr>
							<td style="text-align:center;" class="tdCss"><div class="justifyCss">营业执照注册号</div></td>
							<td style="padding-left:5px;" class="tdCss" colspan="5"><input name="qyxx.gszcdjh" value="${qyxx.gszcdjh}" class="inputNoborder wd"/></td>
						</tr>
						<tr>
							<td style="text-align:center;" class="tdCss"><div class="justifyCss">注册经济类型</div></td>
							<td style="padding-left:5px;" class="tdCss" colspan="5"><input name="qyxx.jjlx" value="${qyxx.jjlx}" class="inputNoborder wd"/></td>
						</tr>
						<tr>
							<td style="text-align:center;" class="tdCss"><div class="justifyCss">主项目资质等级</div></td>
							<td style="padding-left:5px;" class="tdCss" colspan="5"><input name="qyxx.zzdj" value="${qyxx.zzdj}" class="inputNoborder wd"/></td>
						</tr>
						<tr>
							<td style="text-align:center;" class="tdCss"><div class="justifyCss">证书编号</div></td>
							<td style="padding-left:5px;" class="tdCss" colspan="5"><input name="fbzsbh" id="fbzsbh" value="${fbzsbh}" class="inputNoborder wd"/></td>
						</tr>
						<tr>
							<td style="text-align:center;" class="tdCss"><div class="justifyCss">法定代表人</div></td>
							<td style="padding-left:5px;" class="tdCss" width="100px"><input name="qyxx.fddbr" value="${qyxx.fddbr}" class="inputNoborder wd"/></td>
							<td style="text-align:center;" class="tdCss" width="50px"><div class="justifyCss">职务</div></td>
							<td style="padding-left:5px;" class="tdCss" width="100px"><input name="qyxx.fddbrZw" value="${qyxx.fddbrZw}" class="inputNoborder wd"/></td>
							<td style="text-align:center;" class="tdCss" width="50px"><div class="justifyCss">职称</div></td>
							<td style="padding-left:5px;" class="tdCss" width="100px"><input name="qyxx.fddbrZc" value="${qyxx.fddbrZc}" class="inputNoborder wd"/></td>
						</tr>
						<tr>
							<td style="text-align:center;" class="tdCss"><div class="justifyCss">企业负责人</div></td>
							<td style="padding-left:5px;" class="tdCss" width="100px"><input name="qyxx.qyfzr" value="${qyxx.qyfzr}" class="inputNoborder wd"/></td>
							<td style="text-align:center;" class="tdCss" width="50px"><div class="justifyCss">职务</div></td>
							<td style="padding-left:5px;" class="tdCss" width="100px"><input name="qyxx.qyfzrZw" value="${qyxx.qyfzrZw}" class="inputNoborder wd"/></td>
							<td style="text-align:center;" class="tdCss" width="50px"><div class="justifyCss">职称</div></td>
							<td style="padding-left:5px;" class="tdCss" width="100px"><input name="qyxx.qyfzrZc" value="${qyxx.qyfzrZc}" class="inputNoborder wd"/></td>
						</tr>
						<tr>
							<td style="text-align:center;" class="tdCss"><div class="justifyCss">技术负责人</div></td>
							<td style="padding-left:5px;" class="tdCss" width="100px"><input name="qyxx.jsfzr" value="${qyxx.jsfzr}" class="inputNoborder wd"/></td>
							<td style="text-align:center;" class="tdCss" width="50px"><div class="justifyCss">职务</div></td>
							<td style="padding-left:5px;" class="tdCss" width="100px"><input name="qyxx.jsfzrZw" value="${qyxx.jsfzrZw}" class="inputNoborder wd"/></td>
							<td style="text-align:center;" class="tdCss" width="50px"><div class="justifyCss">职称</div></td>
							<td style="padding-left:5px;" class="tdCss" width="100px"><input name="qyxx.jsfzrZc" value="${qyxx.jsfzrZc}" class="inputNoborder wd"/></td>
						</tr>
						<tr>
							<td style="padding-left:5px;" class="tdCss" colspan="6">
							<div style="margin-left:30px;margin-top:10px;">备  注：</div>
							<textarea name="ieiRemarks" class="inputNoborder" style="width:98%;height:160px;overflow:hidden;">${ieiRemarks}</textarea>
							</td>
						</tr>
					</table>
				</td>
				<td width="50%">
					<table width="100%" border=0 class="tableCss" cellspacing="1" cellpadding="0">
						<tr>
							<td style="text-align:center;" class="tdCss"><div class="justifyCss" style="width:50%">承包工程范围</div></td>
						</tr>
						<tr>
							<td class="tdCss" valign="top">
								<div style="margin-left:10px;margin-top:10px;height:410px;"><textarea name="cbgcfw" rows="10" cols="65">${cbgcfw}</textarea></div>
								<div style="font-size:20px;font-weight:bold;height:40px;padding-left:240px;white-space: nowrap;">
									发证机关：<input type="text" class="inputNoborder" style="FONT-SIZE: 16px;" name="sajg" value="${sajg}"/>
								</div>
								<div style="font-size:20px;font-weight:bold;height:40px;padding-left:300px;white-space: nowrap;">
									<input name="qyxx.year" value="${qyxx.year }" class="inputNoborder" style="width:80px;FONT-SIZE: 16px;"/>
									年
									<input name="qyxx.month" value="${qyxx.month}" class="inputNoborder" style="width:42px;FONT-SIZE: 16px;"/>
									月
									<input name="qyxx.day" value="${qyxx.day}" class="inputNoborder" style="width:62px;FONT-SIZE: 16px;"/>
									日
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td colspan="2" style="text-align:center;"></td>
			</tr>
		</table>
		<table width="1100" align="center" style="margin-top:30px;">
			<tr>
				<td align="right" width="50%">
				 <input type="button" id="savezs" onclick="saveQyzzfb();" value="保&nbsp;&nbsp;存" style="width:100px;display:none"/> 
				 <input type="button"  id="printzs" onclick="printQyzzfb();" value="打&nbsp;&nbsp;印" style="width:100px;"/>
				</td>
				<td  width="40%" style="">
				<input type="button" value="关闭窗口" onclick="window.close();" style="width:100px;"/>
				</td>
			</tr>
		</table>
		</form>
		<div id="autoPrintDiv" style="display:none;"><iframe height='1000' width='700' name='autoPrintIFrame'/></div>
	</body>
</html>